cmake_minimum_required(VERSION 3.8)

project(agv_startup)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# 设置 FLANN 相关变量
set(FLANN_ROOT "/usr" CACHE PATH "Path to FLANN installation")
set(CMAKE_POLICY_DEFAULT_CMP0144 NEW)

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(sick_scan_xd REQUIRED)
find_package(witmotion_ros2 REQUIRED)
find_package(chassis_driver REQUIRED)
find_package(realsense2_camera REQUIRED)
find_package(cartographer REQUIRED)
find_package(cartographer_ros REQUIRED)
find_package(nav2_bringup REQUIRED)
find_package(nav2_map_server REQUIRED)
find_package(nav2_amcl REQUIRED)
find_package(nav2_planner REQUIRED)
find_package(nav2_controller REQUIRED)
find_package(nav2_behaviors REQUIRED)
find_package(nav2_bt_navigator REQUIRED)
find_package(nav2_lifecycle_manager REQUIRED)
find_package(nav2_waypoint_follower REQUIRED)
find_package(robot_localization REQUIRED)
find_package(imu_filter_madgwick REQUIRED)
find_package(imu_tools REQUIRED)
find_package(rviz2 REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(joy REQUIRED)
find_package(teleop_twist_joy REQUIRED)

if(BUILD_TESTING)
  find_package(ament_lint_auto REQUIRED)
  # the following line skips the linter which checks for copyrights
  # comment the line when a copyright and license is added to all source files
  set(ament_cmake_copyright_FOUND TRUE)
  # the following line skips cpplint (only works in a git repo)
  # comment the line when this package is in a git repo and when
  # a copyright and license is added to all source files
  set(ament_cmake_cpplint_FOUND TRUE)
  ament_lint_auto_find_test_dependencies()
endif()

install(DIRECTORY launch config maps param urdf
  DESTINATION share/${PROJECT_NAME})

ament_package()
